<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStandardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('standards', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->text('name')->nullable(true);          //标准名称,例如:优秀、良好、一般、关注、重点关注
            $table->integer('business_id');                      //关联业务
            $table->float('upper_limit')->default(0.0);    //评分上限,不包含此评分
            $table->float('lower_limit')->default(0.0);    //评分下限,包含此评分
            $table->date('start_time')->nullable(true);
            $table->date('end_time')->nullable(true);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('standards');
    }
}
